package com.itboy.model;

import com.alibaba.excel.metadata.BaseRowModel;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;

/**
 * 分页
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class Pages extends BaseRowModel implements Serializable {
    private static final long serialVersionUID = 5553589489353607594L;
    private int page;//你要查询第几页
    private int limit;//每页多少行
    private String token;//全局token
    public int getPage() {
        if(page<0 || page==0)page=1;
        return page;
    }
    public int getLimit() {
        if(limit<0 || limit==0)limit=10;
        return limit;
    }
}